Optimal. Leaf size=62 \[ \frac {a \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}+\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2772, 2773, 206} \[ \frac {a \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}+\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2772
Rule 2773
Rubi steps
\begin {align*} \int \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \, dx &=\frac {a \tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}+\frac {1}{2} \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx\\ &=\frac {a \tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}-\frac {a \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}+\frac {a \tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 79, normalized size = 1.27 \[ \frac {\sec \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \sqrt {a (\cos (c+d x)+1)} \left (2 \sin \left (\frac {1}{2} (c+d x)\right )+\sqrt {2} \cos (c+d x) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.28, size = 140, normalized size = 2.26 \[ \frac {{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.75, size = 104, normalized size = 1.68 \[ -\frac {\sqrt {2} {\left (\sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + \frac {4 \, \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}\right )} \sqrt {a}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.48, size = 379, normalized size = 6.11 \[ \frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-2 a \left (\ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )+\ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +\ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +2 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{\sqrt {a}\, \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}\right ) \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 2.59, size = 1170, normalized size = 18.87 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\sqrt {a+a\,\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________